package com.example.lcu_kcb.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * 这里用 SQLLite 实现，不用 Litepal，复习下「基础知识」  2019-12-31
 * */
public class SearchRecordOpenHelper extends SQLiteOpenHelper {
    public SearchRecordOpenHelper(Context context) {
        super(context, "user.db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("create table t_user(" +
                "id integer primary key autoincrement ," +
                "username varchar(50)," +
                "password varchar(50))");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
